<style type="text/css">
    <!--
	p.small {line-height:50%;}
	p.big {line-height:170%;}
	
    .text{	
        font-size:60px;
        font-weight: bold;
        text-align:center;
        font-family: cursive;
    }
    
    .namabatch{	
        font-size:24px;
        font-weight: bold;
        text-align:right;
        font-family: cursive;
    }
    
    .nomer{	
        font-size:14px;
        font-weight: bold;
        text-align:center;
        font-family: cursive;
    } 

    table.isi_tabel
    {
        border-width: 0 0 1px 1px;
        border-spacing: 0;
        border-collapse: collapse;
        border-style: solid;
		-webkit-print-color-adjust:exact;
		
		background-image: url(<?base_url()?>images/print/nametagbg.png);
		background-repeat:repeat;
    }
	
	
    -->
</style>

    <?
    //echo'<table align="center" width="500" border="1" class="isi_tabel" background="'.base_url().'images/print/nametagbg.png">';
    echo'<table align="center" width="450" border="0" class="isi_tabel">';

    $no = 1;
    $no_peserta = 1;
    $counter = 1;
	
	
                       
				   
    foreach ($peserta->result() as $row) {
		if($counter <= $jumlah_peserta){
			$nama_panggilan = $row->NAMA_PANGGILAN;
			if($counter%2==1){
				//jika data terakhir
				if($counter == $jumlah_peserta){
						echo'
					
					<tr height="180 px">
						<td class="namabatch">
							<p>&nbsp;</p>
							<p>&nbsp;</p>
							<p class="small">&nbsp;</p>
							<p class="small">'.$nama_batch.'</p>
						</td>
						<td>&nbsp;</td>';
					
					
					
					
						echo'
						</tr>
						<tr>
						<td class="text" width="200">'.$nama_panggilan.'</td>
						<td width="200">&nbsp;</td>
						</tr>';
						
						echo'
						<tr>
							<td class="nomer">
								<p>'.$cp.'</p>
								<p>&nbsp;</p>
								<p>&nbsp;</p>
								<p>&nbsp;</p>
								<p class="big">&nbsp;</p>
							</td>
							<td>&nbsp;</td>
						</tr>';
					
				}
				
				//jika bukan urutan akhir
				else{
				
				echo'
				
				<tr height="180 px">
					<td class="namabatch">
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p class="small">&nbsp;</p>
						<p class="small">'.$nama_batch.'</p>
					</td>';
				
				if($counter < $jumlah_peserta){
					echo '<td class="namabatch">
							<p>&nbsp;</p>
							<p>&nbsp;</p>
							<p class="small">&nbsp;</p>
							<p class="small">'.$nama_batch.'</p>
						  </td>';
				}
				
				
					echo'
					</tr>
					<tr>
					<td class="text" width="200">'.$nama_panggilan.'</td>';
				}
			}
			else{
				echo'<td class="text" width="200">'.$nama_panggilan.'</td>
					</tr>';
				
				//start cp
				echo'<tr height="220">
					 <td class="nomer">
						<p>'.$cp.'</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p class="big">&nbsp;</p>
					 </td>
					 <td class="nomer">
						<p>'.$cp.'</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p>&nbsp;</p>
						<p class="big">&nbsp;</p>
					 </td>
					</tr>
					';
				//end cp
				
				}



					   
		   
		}
		$counter++;
	
		//echo '<p style="page-break-after: always">&nbsp;</p>';
	}
    echo'</table>';
	
    ?>
<p>&nbsp; </p>